<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="ihis.model.*" %>
<%@ page import="ihis.core.*" %>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Project/Team/Personal Schedule Report</title>
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css"/>
    <script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script>
</head>
<body>

<%
	IHISCore core = new IHISCore();
	GeneralFilter filter = new GeneralFilter();
	ScheduleReport report = (ScheduleReport) core.getReport(IHISConstants.REPORT_PERSONAL_SCHEDULE, filter);
	Schedule schedule = report.getSummary();
	if(schedule == null){
		schedule = new Schedule();
		schedule.setCompletedCnt(0);
		schedule.setDelayedCnt(0);
		schedule.setInProgressCnt(0);
		schedule.setPlannedCnt(0);
	}
%>


	<div id="schedule" data-role="page">
	
    <script type="text/javascript">
    	$(function(){
    		$("#inProgress").bind("click", function(){
    			$.mobile.changePage("report/task.jsp#task", "slide", false, false);
    		});
    	});
    	// 1. page 로 지정된 ID 값,  2.효과 3. 방향 :  false(>), true(<)
    </script>
    
    
		<div data-role="header">
			<a href="../menu.html" data-icon="back" data-rel="back" data-transition="reverse">Back</a>
			<h1>개인/조직 일정 정보</h1>
			<a href="../menu.html" data-icon="home" data-transition="flip">Home</a>
		</div>
	
		<div data-role="content">
			<ul data-role="listview" data-inset="false">
				<li data-role="list-divider">금주</li>
				<li>
					<a href="" id="inProgress" name="inProgress">
						<h4>진행(<%= schedule.getInProgressCnt() %>)</h4>
					</a>
				</li>
				<li>
					<a href="javascript:alert('1234')" name="s2">
						<h4>완료(<%= schedule.getCompletedCnt() %>)</h4>
					</a>
				</li>
				<li>
					<a href="javascript:test1()" name="s2">
						<h3>지연(<%= schedule.getDelayedCnt() %>)</h3>
					</a>
				</li>
				<li>
					<a href="javascript:goTaskInSchedulePage(3)">
						<h3>계(<%= schedule.getCompletedCnt() + schedule.getInProgressCnt() + schedule.getDelayedCnt() %>)</h3>
					</a>
				</li>
				<li data-role="list-divider">차주</li>
				<li>
					<a href="javascript:goTaskInSchedulePage(4)">
						<h3>진행 예정(<%= schedule.getPlannedCnt() %>)</h3>
					</a>
				</li>
				<!-- li>
					<a href="javascript:goTaskInSchedulePage(5)">완료(<%= schedule.getDelayedCnt() %>)</a>
				</li>
				<li>
					<a href="javascript:goTaskInSchedulePage(6)">계(<%= schedule.getPlannedCnt() %>)</a>
				</li-->
			</ul>
		</div> 
		
		<div data-role="footer">
			<a href="searchSchedule.jsp" data-icon="check"  data-transition="slideup">Search</a>
			<a href="schedule.jsp" data-icon="refresh" data-rel="refresh" data-transition="flip">Refresh</a>
		</div>
		
	</div>
</body>
</html>